package com.qf.controller;

import com.qf.pojo.respVo.BaseResp;
import com.qf.service.SearchService;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchController {

    @Autowired
    SearchService searchService;

    @RequestMapping("/search/{keyword}/{page}/{size}/{sort}")
    public BaseResp search(@PathVariable("keyword")String keyword,
                           @PathVariable("page")Integer page,
                           @PathVariable("size")Integer size,
                           @PathVariable("sort")String sort){
        return searchService.search(keyword,page,size,sort);
    }
}
